package com.design.yjx.decorator;

/**
 * @author yuanjianxin
 * @date 2017/8/3 11:10
 */
public class Main {
    public static void main(String[] args) {
        //摩卡，奶油浓咖啡
        Beverage espresso = new Mocha(new Milk(new Espresso()));
        System.out.println("介绍:"+espresso.getDescription()+",价格:"+espresso.getCost());

        System.out.println("======================");

        //双份摩卡混合咖啡
        Beverage houseBlend = new Mocha(new Mocha(new HouseBlend()));
        System.out.println("介绍:" + houseBlend.getDescription() + ",价格:" + houseBlend.getCost());
    }

}
